package com.pearl.web.demo.mvc;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;


public class User {

    @NotEmpty(message = "用户名不能为空")
    String userName;
    @NotNull(message = "密码不能为null")
    String password;
    int age;
    boolean isRegistered;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isRegistered() {
        return isRegistered;
    }

    public void setRegistered(boolean registered) {
        isRegistered = registered;
    }
}
